{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Go To Inner Notebooks\n",
    "This notebook opens a new terminal with the table of contents of the qubiter/qubiter/jupyter_notebooks folder. We call this jupyter_notebooks folder \"inner\" because it is located in the qubiter/qubiter folder."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C:\\Users\\rrtuc\\Desktop\\backed up\\python-projects\\qubiter\\qubiter\\utilities_gen.py\n"
     ]
    }
   ],
   "source": [
    "from qubiter.utilities_gen import find_path_to_qubiter\n",
    "# this method gives path to py file in which the method is defined\n",
    "path1 = find_path_to_qubiter()\n",
    "print(path1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C:\\Users\\rrtuc\\Desktop\\backed up\\python-projects\\qubiter\\qubiter\\jupyter_notebooks\n"
     ]
    }
   ],
   "source": [
    "# this cell gives path to inner jupyter notebooks folder\n",
    "import os\n",
    "path2 = os.path.split(path1)\n",
    "path2 = os.path.join(path2[0], 'jupyter_notebooks')\n",
    "print(path2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C:\\Users\\rrtuc\\Desktop\\backed up\\python-projects\\qubiter\\qubiter\\jupyter_notebooks\n"
     ]
    }
   ],
   "source": [
    "%cd {path2}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Volume in drive C is Windows\n",
      " Volume Serial Number is 46FF-3E97\n",
      "\n",
      " Directory of C:\\Users\\rrtuc\\Desktop\\backed up\\python-projects\\qubiter\\qubiter\\jupyter_notebooks\n",
      "\n",
      "06/14/2019  11:27 AM    <DIR>          .\n",
      "06/14/2019  11:27 AM    <DIR>          ..\n",
      "06/14/2019  11:27 AM                 0 __init__.py\n",
      "06/14/2019  11:27 AM            17,074 autograd_experiments.ipynb\n",
      "06/14/2019  11:27 AM            19,312 Bell_and_CHSH_inequalities.ipynb\n",
      "06/14/2019  11:27 AM             2,890 cs_decomposition_via_cuncsd_cython.ipynb\n",
      "06/14/2019  11:27 AM             9,468 examples_of_placeholder_usage.ipynb\n",
      "06/14/2019  11:27 AM             9,062 Fedortchenko-paper.ipynb\n",
      "06/14/2019  11:27 AM            13,816 forbidden_cnot_expansions.ipynb\n",
      "06/14/2019  11:27 AM            14,235 gate-expansions.ipynb\n",
      "06/14/2019  11:27 AM            16,152 ghz_state.ipynb\n",
      "06/14/2019  11:27 AM               405 JupyterREADME.md\n",
      "06/14/2019  11:27 AM            11,079 loops_at_english_file_level_using_loop_files.ipynb\n",
      "06/14/2019  11:27 AM            10,762 MeanHamilMinimizer_native_with_autograd.ipynb\n",
      "06/14/2019  11:27 AM            16,364 MeanHamilMinimizer_native_with_tf.ipynb\n",
      "06/14/2019  11:27 AM             6,600 MeanHamilMinimizer_native_without_autograd.ipynb\n",
      "06/14/2019  11:27 AM            13,884 MeanHamilMinimizer_rigetti_autograd.ipynb\n",
      "06/14/2019  11:27 AM            14,146 MeanHamilMinimizer_rigetti_scipy.ipynb\n",
      "06/14/2019  11:27 AM            17,697 MeanHamilMinimizer_scipy_native_demo.ipynb\n",
      "06/14/2019  11:27 AM            26,090 phase_est_examples.ipynb\n",
      "06/14/2019  11:27 AM            17,731 phase_est_iterative.ipynb\n",
      "06/14/2019  11:27 AM            30,425 quantum_CSD_compiler_intro.ipynb\n",
      "06/14/2019  11:27 AM            34,209 quantum_CSD_compiler_intro_CN.ipynb\n",
      "06/14/2019  11:27 AM            34,453 Say_Hello_World_With_Qubiter.ipynb\n",
      "06/14/2019  11:27 AM            37,744 Stairs_circuit_and_its_gradients_in_native.ipynb\n",
      "06/14/2019  11:27 AM            13,442 Stairs_ckt_its_gradients_in_rigetti.ipynb\n",
      "06/14/2019  11:27 AM            78,731 Teleportation-showcasing-IF_M-blocks.ipynb\n",
      "06/14/2019  11:27 AM            78,385 Teleportation-showcasing-IF_M-blocks_CN.ipynb\n",
      "06/14/2019  11:27 AM            11,655 Translating_from_Qubiter_to_Xanadu_PennyLane.ipynb\n",
      "06/14/2019  11:27 AM            23,531 translating-qubiter-english-file-to-AnyQasm.ipynb\n",
      "06/14/2019  11:27 AM            10,898 unusual_gates_like_generalized_swap.ipynb\n",
      "              29 File(s)        590,240 bytes\n",
      "               2 Dir(s)  64,684,945,408 bytes free\n"
     ]
    }
   ],
   "source": [
    "%ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# this command opens a new terminal at the current working directory cwd\n",
    "!jupyter notebook"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
